home *** CD-ROM | disk | FTP | other *** search
/ World Tours: Brazil / WorldTours: Brazil.iso / mac / content / main.dir / 00104_Script_preLoad2 < prev    next >
Text File  |  2007-04-22  |  864b  |  36 lines

  1.  
  2. property chapter,n
  3.  
  4. on beginsprite me
  5.   n=member(1, "external files").line.count
  6.   n=n/2
  7.   chapter=[]
  8.   repeat with i=1 to n
  9.     if the machinetype = 256 then
  10.       chapter[i]=preloadNetThing(the moviepath&"chapter\cp"&i&".txt")
  11.     else
  12.       chapter[i]=preloadNetThing(the moviepath&"chapter:cp"&i&".txt")
  13.     end if
  14.   end repeat
  15. end
  16.  
  17. on exitFrame me
  18.   allLoaded=true
  19.   repeat with i=1 to n
  20.     if netDone(chapter[i])=false then allLoaded=false
  21.   end repeat
  22.   
  23.   if allLoaded then 
  24.     repeat with i=1 to n         
  25.       if the machinetype = 256 then
  26.        importFileInto member(i, "chapter"), the moviepath&"chapter\cp"&i&".txt"
  27.       else
  28.        importFileInto member(i, "chapter"), the moviepath&"chapter:cp"&i&".txt"
  29.       end if      
  30.     end repeat
  31.     prepareMainMenu()
  32.     go 12
  33.   else
  34.     go the frame
  35.   end if
  36. end